package com.xiangshizhineng.tianzhangzhi.app.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiangshizhineng.tianzhangzhi.app.common.PagingContext;
import com.xiangshizhineng.tianzhangzhi.app.common.SortingContext;
import com.xiangshizhineng.tianzhangzhi.app.model.entity.TzMes;
import com.xiangshizhineng.tianzhangzhi.app.model.response.NoticeResponse;

import java.util.List;
import java.util.Map;
import java.util.Vector;

public interface NoticeService extends IService<NoticeResponse> {

    /**
     * 仅有一条数据
     * @param wrapper
     * @return
     */
    default NoticeResponse getOnly(LambdaQueryWrapper<NoticeResponse> wrapper){
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }


    /**
     * 有效期内所有公告
     * */
    List<NoticeResponse> allNotice();

    /**
     * 公告详情
     * */
    NoticeResponse noticeDetails(Long id);


    /**
     * 公告轮播图
     * @param
     * @return
     */
    List<NoticeResponse> tNEPics();

    /**
     *查询公告最大id
     */
    int maxId();

}
